{% extends "rest_base.html" %}
{% block rest_script %}
	$(".addToMenu").click(function(e){
		e.preventDefault();
		dishid = $(this).attr("href");
		restid = $(this).attr("rel");
		url = '/order/dish/add/';
		data = {"restid":restid ,"dishid": dishid };
		$.post(url, data, function(result){
			window.location.href = window.location.href;
		});
	});
{% endblock %}
{% block left_content %}
	<table class="res_left_intro"><tbody>
	    <tr>
		    <td class="res_alone_name" colspan="2">{{rest.name}}</td>
	    </tr>
        <tr>
	        <td class="text_right" width="30%">主打菜：</td>
	        <td class="text_left">{{rest.cuisine.name}}</td>
        </tr>
        <tr>
	        <td class="text_right" width="30%">地址：</td>
	        <td class="text_left">{{rest.address}}</td>
        </tr>
        <tr>
	        <td class="text_right" width="30%">营业时间：</td>
	        <td class="text_left">{{rest.open_time}}-{{rest.close_time}}</td>
        </tr>
        <tr>
	        <td class="text_right" width="30%">人均消费：</td>
	        <td class="text_left">{{rest.spend.value}}</td>
        </tr>
    </tbody></table>
{% endblock %}
{% block right_content %}
             <div class="res_right_title">招牌菜</div>
             <ul class="res_zpc">
             {% for d in specdishs %}
                 <li>
                     <img src="/image/{{d.img}}" width="140" height="140">
                     <div class="bt_add"><a class="addToMenu" href="{{d.id}}" rel="{{rest.id}}">加入菜单</a></div>
                     <div class="zpc_alone">                        
                        <span class="dish">{{d.name}}</span>
                        <span class="dish">￥{{d.price}}/例</span>
                        <br>
                        简介：
                        <div class="res_text_container">{{d.desc|safe}}</div>
                     </div>                    
                 </li>
                {% endfor %}
             </ul> 
             
{% endblock %}
